-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC-4345 added testable version of home page JSON example #345
Conversation
tests/Doc/HomeJsonExample.cs
Outdated
using NRedisStack.Search; | ||
using NRedisStack.Search.Aggregation; | ||
using NRedisStack.Search.Literals.Enums; | ||
using NRedisStack.Tests; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would move this into 'HIDE' region.
at first sight i was thinking this should go into 'REMOVE' region, but then i realized
we left some test project related stuff in 'HIDE' regions overall the docs, is it on purpose ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would move this into 'HIDE' region. at first sight i was thinking this should go into 'REMOVE' region, but then i realized we left some test project related stuff in 'HIDE' regions overall the docs, is it on purpose ?
@atakavci Yes, I've done this on purpose for this example. It's actually for this introductory example on the NRedisStack "home" page. The existing example is written to mention everything right from the start (including imports, etc). You are right, though, that in most other examples, we try to focus on just the relevant commands, not the boilerplate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks
This is part of an effort to get the JSON examples on the "home" page consistent for all the client libraries.
The current code in just added inline in the doc page, so it doesn't get the benefit of being tested in the NRedisStack repo and also doesn't have the usual tabbed code example features (like expanding to see the whole source file, etc). The code in this PR is basically the same as the existing code but with tests added.